home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Day Cry
/
Day Cry CD.bin
/
oh_towns
/
ugoku
/
src.lzh
/
MOVREC
/
MOVRECX.C
< prev
next >
Wrap
Text File
|
1994-06-01
|
5KB
|
195 lines
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>
#include <file_dlg.h>
#include <egb.h>
#include <mos.h>
#include <snd.h>
#include "ugoku.h"
char *guiEgbPtr ; /* EGB é╠âÅü[âNâAâhâîâX */
char guiSndPtr[16*1024] ; /* SND é╠âÅü[âNâAâhâîâX */
void main()
{
extern int APL_init() ;
extern int initEtc() ;
MMICTRL ctrl ;
/* ëµû╩Å┴é╡ */
EGB_init(guiSndPtr, 1536) ; /* âTâEâôâhâÅü[âNé≡Ä╪ùp */
/* Ævû╜ôIâGâëü[ânâôâhâëé╠ôoÿ^ */
FM_SetVector() ;
/* âTâEâôâhé╠Åëè·ë╗ */
SND_init(guiSndPtr) ;
/* Åëè·ë╗Åêù¥ */
ctrl.page0 = 10 ;
ctrl.page1 = 3 ;
ctrl.writePage = 1 ;
ctrl.displayPage = 2 ;
ctrl.priority = 1 ;
ctrl.mode = 0 ;
ctrl.width = 512 ;
ctrl.size = 0 ;
ctrl.ptr = NULL ;
ctrl.asize = 0 ;
ctrl.aptr = NULL ;
ctrl.fr.lupx = 0 ;
ctrl.fr.lupy = 0 ;
ctrl.fr.rdwx = 639 ;
ctrl.fr.rdwy = 479 ;
ctrl.move.lupx = 0 ;
ctrl.move.lupy = 20 ; /* â_âCâAâìâOé╠ê┌ô«ö═ê═é╔ɺî└é≡òté»éΘ(yì└òW) */
ctrl.move.rdwx = 639 ;
ctrl.move.rdwy = 479 ;
ctrl.white = 15 ;
ctrl.black = 8 ; /* âpâîâbâgò╧ìXé╔ö║éóGUIé╠ò\ĪÉFé≡ò╧ìX(ìò) */
ctrl.gray = 7 ; /* üV (èDÉF) */
ctrl.xor = 7 ; /* üV (ö╜ô]ÉF) */
if (MMI_Open( &ctrl ) == NOERR)
{
/* Åëè·ë╗é╔ɼî≈é╖éΩé╬âüâCâôâïü[âvé╔ôⁿéΘ. */
if (APL_init() == NOERR)
{
FDG_SaveCurDir() ; /* âJâîâôâgâfâBâîâNâgâèò█æ╢ */
FDG_InitFileDlg() ; /* âtâ@âCâïâ_âCâAâìâOÅëè·ë╗ */
if( initEtc() == NOERR ) /* Ä⌐ë╞É╗init */
MMI_ExecSystem() ; /* âüâCâôé╠âCâxâôâgâïü[âv */
FDG_FreeFileDlg() ; /* âtâ@âCâïâ_âCâAâìâOÅIù╣Åêù¥ */
FDG_RecovCurDir() ; /* âJâîâôâgâfâBâîâNâgâèò£î│ */
}
MMI_SendMessage( MMI_GetBaseObj(), MM_ERASE, 0 ) ;
}
/* ÅIù╣Åêù¥ */
MMI_Close() ;
/* âTâEâôâhé╠ÅIù╣ */
SND_end() ;
/* Ævû╜ôIâGâëü[ânâôâhâëé╠ò£ïA */
FM_ResetVector() ;
}
int APL_init()
{
extern int setPalette( char * ) ; /* âpâîâbâgÉ▌ÆΦè╓Éö */
extern int mouseDsp( int ) ; /* â}âEâXò\Īè╓Éö */
extern int mItemId[] ;
extern MMIINIT initDataIRCDSK ;
extern MMIINIT initDataIRCDSK2 ;
extern MMIINIT initDataIRCABOU ;
extern MMIINIT initDataIRCERR ;
extern MMIINIT initDataIRCTIF ;
extern MMIINIT initDataIRCPAC ;
extern MMIINIT initDataIRCSET ;
extern MMIINIT initDataIRCEDT ;
extern MMIINIT initDataIRCFRM ;
register int ret ;
/* EGB âÅü[âNâAâhâîâXé╠ĵô╛. */
guiEgbPtr = MMI_GetEgbPtr() ;
/* ânâCâpî^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initHyper()) < 0)
return ret ;
/* â_âCâAâìâOî^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initDialogL40()) < 0)
return ret ;
/* âAâëü[âgî^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initAlertL40()) < 0)
return ret ;
/* âüâbâZü[âWî^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initMessageL40()) < 0)
return ret ;
/* âüâjâàü[î^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initMenuL40()) < 0)
return ret ;
/* â{â^âôî^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initButtonL40()) < 0)
return ret ;
/* âhâìâEâ{â^âôî^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initDrawButtonL40()) < 0)
return ret ;
/* âAâCâRâôâ{â^âôî^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initIconL40()) < 0)
return ret ;
/* âgâOâïâAâCâRâôî^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initToggleIconL40()) < 0)
return ret ;
/* âüâjâàü[âAâCâeâÇî^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initMenuItemL40()) < 0)
return ret ;
/* âXâNâìü[âïî^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initScrollBarL40()) < 0)
return ret ;
/* âeâLâXâgî^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initTextL40()) < 0)
return ret ;
/* âèâXâgâüâjâàü[î^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initListMenuL40()) < 0)
return ret ;
/* ÉöÆlôⁿù═î^òöòié╠Åëè·ë╗ */
if ((ret = MMI_initNumBoxL40()) < 0)
return ret ;
/* âfâtâHâïâgârâWâàâAâïâCâtâFâNâgé╠ôoÿ^ */
MMI_SetUpVisualEffect() ;
/* âpâîâbâgò╧ìXÑÑÑÑéQëµû╩Ägùpé╠ëeï┐é≡Ä≤é»éΘé╜é▀ */
ret = setPalette( guiEgbPtr ) ;
/* â}âEâXâJü[â\âïò\Īè╓Éöé╠ò╧ìXÑÑÑÑéQëµû╩Ägùpé╠ëeï┐é≡Ä≤é»éΘé╜é▀ */
MMI_SetPtrFunc( mouseDsp ) ;
/* öwîiâfü[â^é╠Åëè·ë╗ */
/* âfü[â^é╠ôoÿ^ */
if ((ret = MMI_Init(&initDataIRCDSK)) < 0)
return ret ;
if ((ret = MMI_Init(&initDataIRCDSK2)) < 0)
return ret ;
if ((ret = MMI_Init(&initDataIRCABOU)) < 0)
return ret ;
if ((ret = MMI_Init(&initDataIRCERR)) < 0)
return ret ;
if ((ret = MMI_Init(&initDataIRCTIF)) < 0)
return ret ;
if ((ret = MMI_Init(&initDataIRCPAC)) < 0)
return ret ;
if ((ret = MMI_Init(&initDataIRCSET)) < 0)
return ret ;
if ((ret = MMI_Init(&initDataIRCEDT)) < 0)
return ret ;
if ((ret = MMI_Init(&initDataIRCFRM)) < 0)
return ret ;
/* SIDEWORKâüâjâàü[é╠ôoÿ^ */
ret = MMI_SetUpSDKMenu( mItemId[0], 2 ) ;
/* öwîié≡ò\Īé╖éΘ */
MMI_SendMessage(MMI_GetBaseObj(), MM_SHOW, 0) ;
return NOERR ;
}